package com.esri.core.portal;

import com.esri.core.internal.util.d;
import org.achartengine.internal.a;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class PortalFolder {
    private String a;
    private String b;
    private String c;
    private long d;

    PortalFolder() {
    }

    public PortalFolder(String str, String str2, String str3, long j) {
        this.a = str;
        this.b = str2;
        this.c = str3;
        this.d = j;
    }

    public static PortalFolder fromJson(JsonParser jsonParser) throws Exception {
        if (d.c(jsonParser)) {
            PortalFolder portalFolder = new PortalFolder();
            jsonParser.enable(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS);
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String currentName = jsonParser.getCurrentName();
                jsonParser.nextToken();
                if (currentName.equals("id")) {
                    portalFolder.a = jsonParser.getText();
                } else if (currentName.equals(a.b)) {
                    portalFolder.b = jsonParser.getText();
                } else if (currentName.equals("username")) {
                    portalFolder.c = jsonParser.getText();
                } else if (currentName.equals("created")) {
                    portalFolder.d = jsonParser.getLongValue();
                } else {
                    jsonParser.skipChildren();
                }
            }
            return portalFolder;
        }
        return null;
    }

    public String getFolderId() {
        return this.a;
    }

    public String getTitle() {
        return this.b;
    }

    public String getUsername() {
        return this.c;
    }

    public long getCreated() {
        return this.d;
    }

    public int hashCode() {
        long j = this.d;
        int i = (((int) (j ^ (j >>> 32))) + 31) * 31;
        String str = this.a;
        int hashCode = (i + (str == null ? 0 : str.hashCode())) * 31;
        String str2 = this.b;
        int hashCode2 = (hashCode + (str2 == null ? 0 : str2.hashCode())) * 31;
        String str3 = this.c;
        return hashCode2 + (str3 != null ? str3.hashCode() : 0);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && (obj instanceof PortalFolder)) {
            PortalFolder portalFolder = (PortalFolder) obj;
            if (this.d != portalFolder.d) {
                return false;
            }
            String str = this.a;
            if (str == null) {
                if (portalFolder.a != null) {
                    return false;
                }
            } else if (!str.equals(portalFolder.a)) {
                return false;
            }
            String str2 = this.b;
            if (str2 == null) {
                if (portalFolder.b != null) {
                    return false;
                }
            } else if (!str2.equals(portalFolder.b)) {
                return false;
            }
            String str3 = this.c;
            if (str3 == null) {
                if (portalFolder.c != null) {
                    return false;
                }
            } else if (!str3.equals(portalFolder.c)) {
                return false;
            }
            return true;
        }
        return false;
    }

    public String toString() {
        return "PortalFolder [folderId=" + this.a + ", title=" + this.b + ", username=" + this.c + ", created=" + this.d + "]";
    }
}
